import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import path from "path";
import svgLoader from "vite-svg-loader";

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue(), svgLoader()],
  resolve: {
    alias: {
      "@": path.resolve("./src"),
    },
  },
  server: {
    host: "0.0.0.0",
  },
  build: {
    terserOptions: {
      compress: {
        // 生产环境去除console及debug
        drop_console: true,
        drop_debugger: true,
      },
    },
  },
});
